const Request = require('../../../request');



// 获取活动列表
export function getActivityList(param){
    return Request({
        url: 'api/activity/search',
        method: 'POST',
        data: param
    })
}

// 获取活动详情
export function getActivityDetail(param) {
    return Request({
        url: 'api/activity/get/' + param,
        method: 'GET'
    })
}

// 添加活动
export function addActivity(param){
    return Request({
        url: 'api/activity/add', 
        method: 'POST',
        data: param
    })
}

// 获取报名人群
export function getOptions(){
    return Request({
        url: 'api/class/checkBox',
        method: 'GET'
    })
}

// 获取签到码
export function getSignCode(param){
    return Request({
        url: 'api/log/signCode/' + param,
        method: 'GET'
    })
}

// 完成活动
export function completeActivity(param){
    return Request({
        url: 'api/evaluate/log',
        method: 'POST',
        data: param
    })
}



export function getClassList(param){
    return Request({
        url: 'api/class/list',
        method: 'POST',
        data: param
    })
}


export function reSignLog(param){
    return Request({
        url: 'api/log/reSign',
        method: 'POST',
        data: param
    })
}


export function getDepartmentBySearch(){
    return Request({
        url: 'api/department/list',
        method: 'POST'
    })
}

export function getMajorBySearch(param){
    return Request({
        url: 'api/major/list',
        method: 'POST',
        data: param
    })
}

export function getClassBySearch(param){
    return Request({
        url: 'api/class/list',
        method: 'POST',
        data: param
    })
}

export function getStudentBySearch(param){
    return Request({
        url: 'api/student/list',
        method: 'POST',
        data: param
    })
}